package de.bk.timecalc.core;

/**
 * That should be an enum but we want to use this library in a MIDlet too and
 * enums are not supported in MIDlets???
 * 
 * @author Bastian Krol
 */
public abstract class Difference
{

  // W/Duel: 5
  // W/TDM: 12
  // A: 25
  // H: 35 (MH sometimes 2min)
  // Q: 2min

  private int seconds;

  private Difference(int seconds)
  {
    this.seconds = seconds;
  }

  public final int getSeconds()
  {
    return this.seconds;
  }

  public String getDisplayText()
  {
    return this.seconds + " seconds";
  }

  public static final Difference TWO_MINUTES = new TwoMinutes();

  private static class TwoMinutes extends Difference
  {
    private TwoMinutes()
    {
      super(120);
    }

    public String getDisplayText()
    {
      return "2 minutes";
    }
  }

  public static final Difference THIRTY_FIVE_SECONDS = new ThirtyFiveSeconds();

  private static class ThirtyFiveSeconds extends Difference
  {
    private ThirtyFiveSeconds()
    {
      super(35);
    }
  }

  public static final Difference TWENTY_FIVE_SECONDS = new TwentyFiveSeconds();

  private static class TwentyFiveSeconds extends Difference
  {
    private TwentyFiveSeconds()
    {
      super(25);
    }
  }

  public static final Difference[] ALL_DIFFERENCES = new Difference[] {
      TWO_MINUTES, THIRTY_FIVE_SECONDS, TWENTY_FIVE_SECONDS };

  // TWELVE_SECONDS(12),

  // FIVE_SECONDS(5);
}